<template>
  <el-table :data="tableData" >
      <!-- <el-table-column type="selection" width="55" /> -->
        <!-- <el-table-column prop="avatar" label="头像" width="80" align="center">
          <template v-slot="scope">
            <img :src="getServerUrl()+'image/userAvatar/'+scope.row.avatar" width="50" height="50"/>
          </template>
        </el-table-column> -->
    <el-table-column prop="username" label="用户名"  width="100" />
    <el-table-column prop="roles" label="拥有角色" width="200"></el-table-column>
  </el-table>
        
</template>

<script setup>
import { ref, reactive, computed } from "vue"
import requestUtil,{getServerUrl} from "@/util/request";

const total = ref(0)

const tableData=ref({})
const queryForm=ref({
  query:'',
  pageNum:1,
  pageSize:10
})
const initUserList=async()=>{
  const res=await requestUtil.post("member/sys/user/list",queryForm.value);
  console.log("res.data:  "+ res.data)
  tableData.value=res.data.userList;
  total.value=res.data.total;
}

initUserList();
</script>

<style lang="scss" scoped>

</style>